<?php if (!defined ('TYPO3_MODE')) 	die ('Access denied.'); ?>

<br /><hr /><br />

<h2>Example 2: Form</h2>

<?= $this->htmlList($this->submittedValues, false, array('style' => 'background:green;color:white;')) ?>
<?php if($this->validationErrors): ?>
	<?= $this->formErrors($this->validationErrors, array('style' => 'background:red;color:white;')) ?>
<?php endif; ?>

<form action="<?= $this->formAction ?>" method="post">

	<!-- Hidden -->
	<?= $this->formHidden('no_cache', '1'); ?>

	<b>Label</b><br />
	<?= $this->formLabel('label', 'Label'); ?><br />
	<br />

	<b>Text</b><br />
	<?= $this->formText('text', $this->text); ?><br />
	<br />

	<b>Checkbox</b><br />
	<?= $this->formMultiCheckbox('checkbox', $this->checkbox, array(), array('blue' => 'Blue', 'red' => 'Red', 'green' => 'Green')); ?><br />
	<br />

	<b>Radio</b><br />
	<?= $this->formRadio('radio', $this->radio, array(), array('yes' => 'Yes', 'no' => 'No', 'none' => 'None')); ?><br />
	<br />

	<b>Textarea</b><br />
	<?= $this->formTextarea('textarea', $this->textarea, array('rows' => 5)); ?><br />
	<br />

	<b>Select</b><br />
	<?= $this->formSelect('select', $this->select, array(), array('', 'Fruits', 'Meat', 'Vegetable')); ?><br />
	<br />

	<b>Password</b><br />
	<?= $this->formPassword('password'); ?><br />
	<br />

	<b>File</b><br />
	<?= $this->formFile('file'); ?><br />
	<br />

	<b>Submit-/Resetbuttons</b><br />
	<?= $this->formSubmit('submit', 'Submit form'); ?><?= $this->formReset('reset', 'Reset form'); ?><?= $this->formButton('button', 'Submit button', 'Click me', array('onclick' => "alert('You have clicked the button!');")); ?><?= $this->formImage('image', 'typo3conf/ext/zviewtest/pi1/res/submit_button.gif'); ?><br />

</form>